package com.chinaums.fsp.sdk.request;

import com.chinaums.fsp.base.pgt.TransType;
import com.chinaums.fsp.sdk.base.RequestData;
import com.chinaums.fsp.sdk.base.ResponseDataWrapper;
import com.chinaums.fsp.sdk.pgt.params.VoucherPrintRequest;
import com.chinaums.fsp.sdk.pgt.params.VoucherPrintResponse;

/**
 * 直贴凭证打印
 * @author hty
 *
 */
public class DraftVPUrlTest extends BaseRequest{
	public void test()throws Exception{
		PgtRequestFactory rf = FACTORY.factory();
		RequestData.Builder builder = this.createRequestDataBuilder();
		VoucherPrintRequest data = VoucherPrintRequest.newBuilder()
									.setCertId("93131082MA08099101")
									.setEnterpriseName("天津金融资产登记结算公司开户测试22")
									.build();
		builder.setTransType(TransType.DRAFT_VOUCHER_PRINT.getTransCode());
		rf.transType(TransType.DRAFT_VOUCHER_PRINT.getTransCode())
		.responseClass(VoucherPrintResponse.class)
		.data(data)
		;
		ResponseDataWrapper rdw = rf.post();
		String json = this.json(rdw);
		this.printToDraft(rdw);
	}

}
